package com.lanyun.web.enums;


import lombok.Getter;

/**
 * 删除状态枚举
 *
 * @Author Jqcc
 * @Version 1.0
 * @Data 2024/2/14
 */

@Getter
public enum IsDeletedFlagEnum {

    DELETED("deleted", "已删除"),

    UN_DELETED("undeleted", "未删除");

    private String val;

    private String desc;

    IsDeletedFlagEnum(String code, String desc) {
        this.val = code;
        this.desc = desc;
    }

    public static IsDeletedFlagEnum getByCode(int val) {
        for (IsDeletedFlagEnum isDeletedFlagEnum : IsDeletedFlagEnum.values()) {
            if (isDeletedFlagEnum.val.equals(val)) {
                return isDeletedFlagEnum;
            }
        }
        return null;
    }
}
